import { defineStore } from 'pinia'

export const usePersonInfoStore = defineStore('personInfo', {
    actions: {
        addOne() {
            this.age += 1
        },
        reduceOne() {
            this.age -= 1
        },
        addGrade() {
            this.grade += 1
        },
        reduceGrade() {
            this.grade -= 1
        }
    },
    state() {
        return {
            name: '李华',
            age: 20,
            gender: "女",
            major: "数字媒体技术",
            address: "北京",
            hobby: "钓鱼",
            grade: 80
        }
    }
})